#ifndef __LINKSTACK_H_
#define __LINKSTACK_H_


#include "DoubleLinkList.h"
class LinkStack
{
public:
    using ElementType = DoubleLinkList::ElementType;
    LinkStack();
    ~LinkStack();

    //入栈
    void Push(const ElementType& element);
    //出栈
    void Pop();
    //取栈顶元素
    ElementType *GetTop();
    //判断栈是否为空
    bool IsEmpty();

    size_t Size()
    {
        return list.Size();
    }
private:
    DoubleLinkList list;
};

#endif
